package com.danceforyou.user.service.impl;

import com.danceforyou.common.service.impl.BaseServiceImpl;
import com.danceforyou.user.dao.MenuDAO;
import com.danceforyou.user.model.MenuDO;
import com.danceforyou.user.service.MenuService;
import com.danceforyou.user.vo.MenuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* 类名称：MenuServiceImpl
* 创建人：danceforyou
* 创建时间：2021年01月12日
* 版本号：1.0v
*/
@Service("menuService")
public class MenuServiceImpl extends BaseServiceImpl<Long, MenuDO, MenuVO, MenuDAO> implements MenuService {
    @Autowired
    private MenuDAO menuDAO;

    @Override
    public MenuDAO getDao() {
        return menuDAO;
    }

    @Override
    public List<MenuVO> getMenuListByRoleId(Long roleId) {
        return menuDAO.getMenuListByRoleId(roleId);
    }

    @Override
    public List<MenuVO> getUserMenus(Long userId) {
        return menuDAO.getUserMenus(userId);
    }

    @Override
    public List<String> listUserBacklogKeys(Long userId) {
        return menuDAO.listUserBacklogKeys(userId);
    }
}
